home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 52 / Amiga Format AFCD52 (Issue 136, May 2000).iso / -serious- / programming / other / whdload / src / whdloadgci / wincust.c < prev   
C/C++ Source or Header  |  2000-02-28  |  22KB  |  396 lines

  1. /*****************************************************************************
  2. ;  :Module.        wincust.c
  3. ;  :Author.        Bert Jahn
  4. ;  :EMail.        jah@fh-zwickau.de
  5. ;  :Address.    Franz-Liszt-Straße 16, Rudolstadt, 07404, Germany
  6. ;  :Version.    $Id: wincust.c 0.1 1998/08/06 23:13:50 jah Exp $
  7. ;  :History.    18.07.98 started
  8. ;  :Copyright.    All Rights Reserved
  9. ;  :Language.    C
  10. ;  :Tabsize.    4
  11. ;  :Translator.    SAS 6.58
  12. *****************************************************************************/
  13.  
  14. #include <clib/alib_protos.h>
  15. #include <clib/muimaster_protos.h>
  16.  
  17. #include <pragmas/muimaster_pragmas.h>
  18.  
  19. #include "whddump.h"
  20. #include "WHDLoadGCI.h"
  21.  
  22. /****************************************************************************/
  23.  
  24. extern APTR                        app,win;
  25. extern struct whddump_custom    *custom;
  26. extern struct NewMenu            MenuData1[];
  27. extern const char                *StringHexAccept;
  28. extern struct Library            *MUIMasterBase;
  29.  
  30. /****************************************************************************/
  31.  
  32. APTR win_cust = NULL;
  33.  
  34. /****************************************************************************/
  35.  
  36. void make_win_cust(void) {
  37.     ULONG open;
  38.     APTR strip_cust;
  39.     APTR
  40.         c_vhpos,c_joy0dat,c_joy1dat,c_adkcon,c_pot0dat,c_pot1dat,c_potgo,c_joytest,c_serdat,c_serper,c_dskbyt,c_dskpt,c_dsklen,c_dsksync,
  41.         c_copcon,c_cop1lc,c_cop2lc,c_copjmp1,c_copjmp2,
  42.         c_bltcon0,c_bltcon1,c_bltafwm,c_bltalwm,c_bltapt,c_bltbpt,c_bltcpt,c_bltdpt,
  43.         c_diwstrt,c_diwstop,c_ddfstrt,c_ddfstop,
  44.         c_bltamod,c_bltbmod,c_bltcmod,c_bltdmod,c_bltadat,c_bltbdat,c_bltcdat,c_bltsize,c_bltsizv,c_bltsizh,
  45.         c_bplcon0,c_bplcon1,c_bplcon2,c_bplcon3,c_bplcon4,c_clxcon,c_clxcon2,c_clxdat,c_bpl1mod,c_bpl2mod,
  46.         c_bpl1pt,c_bpl2pt,c_bpl3pt,c_bpl4pt,c_bpl5pt,c_bpl6pt,c_bpl7pt,c_bpl8pt,
  47.         c_spr1pt,c_spr2pt,c_spr3pt,c_spr4pt,c_spr5pt,c_spr6pt,c_spr7pt,c_spr8pt,
  48.         c_color00,c_color01,c_color02,c_color03,c_color04,c_color05,c_color06,c_color07,c_color08,c_color09,
  49.         c_color10,c_color11,c_color12,c_color13,c_color14,c_color15,c_color16,c_color17,c_color18,c_color19,
  50.         c_color20,c_color21,c_color22,c_color23,c_color24,c_color25,c_color26,c_color27,c_color28,c_color29,
  51.         c_color30,c_color31,
  52.         c_aud0lc,c_aud0len,c_aud0per,c_aud0vol,c_aud0dat,c_aud1lc,c_aud1len,c_aud1per,c_aud1vol,c_aud1dat,
  53.         c_aud2lc,c_aud2len,c_aud2per,c_aud2vol,c_aud2dat,c_aud3lc,c_aud3len,c_aud3per,c_aud3vol,c_aud3dat,
  54.         c_lisaid,c_htotal,c_hsstop,c_hbstrt,c_hbstop,c_vtotal,c_vsstop,c_vbstrt,c_vbstop,c_sprhstrt,c_sprhstop,c_bplhstrt,
  55.         c_bplhstop,c_hhpos,c_beamcon0,c_hsstrt,c_vsstrt,c_hcenter,c_diwhigh,c_bplhmod,c_sprhpt,c_bplhpt,c_fmode;
  56.  
  57.     if (win_cust) {
  58.         get(win_cust,MUIA_Window_Open,&open);
  59.         if (open)    set(win_cust,MUIA_Window_Open,FALSE);
  60.         else        set(win_cust,MUIA_Window_Open,TRUE);
  61.     } else {
  62.         win_cust = WindowObject,
  63.             MUIA_Window_Title, "More Custom",
  64.             MUIA_Window_ID   , MAKE_ID('C','U','S','T'),
  65.             MUIA_Window_Menustrip, strip_cust = MUI_MakeObject(MUIO_MenustripNM,MenuData1,0),
  66.             WindowContents, HGroup,
  67.                 Child, VGroup,
  68.                 Child, HGroup, GroupFrameT("In/Output"), MUIA_Group_Columns, 2,
  69.                     Child, Label2("joy0dat:"), Child, c_joy0dat = TextObject, StringFrame, End,
  70.                     Child, Label2("joy1dat:"), Child, c_joy1dat = TextObject, StringFrame, End,
  71.                     Child, Label2("pot0dat:"), Child, c_pot0dat = TextObject, StringFrame, End,
  72.                     Child, Label2("pot1dat:"), Child, c_pot1dat = TextObject, StringFrame, End,
  73.                     Child, Label2("potgo:"), Child, c_potgo = StringHex4,
  74.                     Child, Label2("joytest:"), Child, c_joytest = StringHex4,
  75.                        End,
  76.                 Child, HGroup, GroupFrameT("Disk"), MUIA_Group_Columns, 2,
  77.                     Child, Label2("adkcon:"), Child, c_adkcon = StringHex4,
  78.                     Child, Label2("dskbyt:"), Child, c_dskbyt = TextObject, StringFrame, End,
  79.                     Child, Label2("dskpt:"), Child, c_dskpt = StringHex8,
  80.                     Child, Label2("dsklen:"), Child, c_dsklen = StringHex4,
  81.                     Child, Label2("dsksync:"), Child, c_dsksync = StringHex4,
  82.                        End,
  83.                 Child, HGroup, GroupFrameT("Blitter"), MUIA_Group_Columns, 2,
  84.                     Child, Label2("bltcon0:"), Child, c_bltcon0 = StringHex4,
  85.                     Child, Label2("bltcon1:"), Child, c_bltcon1 = StringHex4,
  86.                     Child, Label2("bltafwm:"), Child, c_bltafwm = StringHex4,
  87.                     Child, Label2("bltalwm:"), Child, c_bltalwm = StringHex4,
  88.                     Child, Label2("bltapt:"), Child, c_bltapt = StringHex8,
  89.                     Child, Label2("bltbpt:"), Child, c_bltbpt = StringHex8,
  90.                     Child, Label2("bltcpt:"), Child, c_bltcpt = StringHex8,
  91.                     Child, Label2("bltdpt:"), Child, c_bltdpt = StringHex8,
  92.                     Child, Label2("bltamod:"), Child, c_bltamod = StringHex4,
  93.                     Child, Label2("bltbmod:"), Child, c_bltbmod = StringHex4,
  94.                     Child, Label2("bltcmod:"), Child, c_bltcmod = StringHex4,
  95.                     Child, Label2("bltdmod:"), Child, c_bltdmod = StringHex4,
  96.                     Child, Label2("bltadat:"), Child, c_bltadat = StringHex4,
  97.                     Child, Label2("bltbdat:"), Child, c_bltbdat = StringHex4,
  98.                     Child, Label2("bltcdat:"), Child, c_bltcdat = StringHex4,
  99.                     Child, Label2("bltsize:"), Child, c_bltsize = TextObject, StringFrame, End,
  100.                     Child, Label2("bltsizv:"), Child, c_bltsizv = StringHex4,
  101.                     Child, Label2("bltsizh:"), Child, c_bltsizh = TextObject, StringFrame, End,
  102.                     End,
  103.                 End,
  104.                 Child, VGroup,
  105.                 Child, HGroup, GroupFrameT("Copper"), MUIA_Group_Columns, 2,
  106.                     Child, Label2("copcon:"), Child, c_copcon = StringHex4,
  107.                     Child, Label2("cop1lc:"), Child, c_cop1lc = StringHex8,
  108.                     Child, Label2("cop2lc:"), Child, c_cop2lc = StringHex8,
  109.                     Child, Label2("copjmp1:"), Child, c_copjmp1 = TextObject, StringFrame, End,
  110.                     Child, Label2("copjmp2:"), Child, c_copjmp2 = TextObject, StringFrame, End,
  111.                        End,
  112.                 Child, HGroup, GroupFrameT("Raster"), MUIA_Group_Columns, 2,
  113.                     Child, Label2("vhpos:"), Child, c_vhpos = TextObject, StringFrame, End,
  114.                     Child, Label2("diwstrt:"), Child, c_diwstrt = StringHex4,
  115.                     Child, Label2("diwstop:"), Child, c_diwstop = StringHex4,
  116.                     Child, Label2("ddfstrt:"), Child, c_ddfstrt = StringHex4,
  117.                     Child, Label2("ddfstop:"), Child, c_ddfstop = StringHex4,
  118.                     Child, Label2("bplcon0:"), Child, c_bplcon0 = StringHex4,
  119.                     Child, Label2("bplcon1:"), Child, c_bplcon1 = StringHex4,
  120.                     Child, Label2("bplcon2:"), Child, c_bplcon2 = StringHex4,
  121.                     Child, Label2("bplcon3:"), Child, c_bplcon3 = StringHex4,
  122.                     Child, Label2("bplcon4:"), Child, c_bplcon4 = StringHex4,
  123.                     Child, Label2("clxcon:"), Child, c_clxcon = StringHex4,
  124.                     Child, Label2("clxcon2:"), Child, c_clxcon2 = StringHex4,
  125.                     Child, Label2("clxdat:"), Child, c_clxdat = TextObject, StringFrame, End,
  126.                     Child, Label2("bpl1mod:"), Child, c_bpl1mod = StringHex4,
  127.                     Child, Label2("bpl2mod:"), Child, c_bpl2mod = StringHex4,
  128.                     Child, Label2("bpl1pt:"), Child, c_bpl1pt = TextObject, StringFrame, End,
  129.                     Child, Label2("bpl2pt:"), Child, c_bpl2pt = TextObject, StringFrame, End,
  130.                     Child, Label2("bpl3pt:"), Child, c_bpl3pt = TextObject, StringFrame, End,
  131.                     Child, Label2("bpl4pt:"), Child, c_bpl4pt = TextObject, StringFrame, End,
  132.                     Child, Label2("bpl5pt:"), Child, c_bpl5pt = TextObject, StringFrame, End,
  133.                     Child, Label2("bpl6pt:"), Child, c_bpl6pt = TextObject, StringFrame, End,
  134.                     Child, Label2("bpl7pt:"), Child, c_bpl7pt = TextObject, StringFrame, End,
  135.                     Child, Label2("bpl8pt:"), Child, c_bpl8pt = TextObject, StringFrame, End,
  136.                     End,
  137.                 Child, HGroup, GroupFrameT("Serial"), MUIA_Group_Columns, 2,
  138.                     Child, Label2("serdat:"), Child, c_serdat = StringHex4,
  139.                     Child, Label2("serper:"), Child, c_serper = StringHex4,
  140.                        End,
  141.                    End,
  142.                 Child, HGroup, GroupFrameT("Color"), MUIA_Group_Columns, 2,
  143.                     Child, Label2("color00:"), Child, c_color00 = StringHex4,
  144.                     Child, Label2("color01:"), Child, c_color01 = StringHex4,
  145.                     Child, Label2("color02:"), Child, c_color02 = StringHex4,
  146.                     Child, Label2("color03:"), Child, c_color03 = StringHex4,
  147.                     Child, Label2("color04:"), Child, c_color04 = StringHex4,
  148.                     Child, Label2("color05:"), Child, c_color05 = StringHex4,
  149.                     Child, Label2("color06:"), Child, c_color06 = StringHex4,
  150.                     Child, Label2("color07:"), Child, c_color07 = StringHex4,
  151.                     Child, Label2("color08:"), Child, c_color08 = StringHex4,
  152.                     Child, Label2("color09:"), Child, c_color09 = StringHex4,
  153.                     Child, Label2("color10:"), Child, c_color10 = StringHex4,
  154.                     Child, Label2("color11:"), Child, c_color11 = StringHex4,
  155.                     Child, Label2("color12:"), Child, c_color12 = StringHex4,
  156.                     Child, Label2("color13:"), Child, c_color13 = StringHex4,
  157.                     Child, Label2("color14:"), Child, c_color14 = StringHex4,
  158.                     Child, Label2("color15:"), Child, c_color15 = StringHex4,
  159.                     Child, Label2("color16:"), Child, c_color16 = StringHex4,
  160.                     Child, Label2("color17:"), Child, c_color17 = StringHex4,
  161.                     Child, Label2("color18:"), Child, c_color18 = StringHex4,
  162.                     Child, Label2("color19:"), Child, c_color19 = StringHex4,
  163.                     Child, Label2("color20:"), Child, c_color20 = StringHex4,
  164.                     Child, Label2("color21:"), Child, c_color21 = StringHex4,
  165.                     Child, Label2("color22:"), Child, c_color22 = StringHex4,
  166.                     Child, Label2("color23:"), Child, c_color23 = StringHex4,
  167.                     Child, Label2("color24:"), Child, c_color24 = StringHex4,
  168.                     Child, Label2("color25:"), Child, c_color25 = StringHex4,
  169.                     Child, Label2("color26:"), Child, c_color26 = StringHex4,
  170.                     Child, Label2("color27:"), Child, c_color27 = StringHex4,
  171.                     Child, Label2("color28:"), Child, c_color28 = StringHex4,
  172.                     Child, Label2("color29:"), Child, c_color29 = StringHex4,
  173.                     Child, Label2("color30:"), Child, c_color30 = StringHex4,
  174.                     Child, Label2("color31:"), Child, c_color31 = StringHex4,
  175.                     End,
  176.                 Child, VGroup,
  177.                 Child, HGroup, GroupFrameT("Sprite"), MUIA_Group_Columns, 2,
  178.                     Child, Label2("spr1pt:"), Child, c_spr1pt = TextObject, StringFrame, End,
  179.                     Child, Label2("spr2pt:"), Child, c_spr2pt = TextObject, StringFrame, End,
  180.                     Child, Label2("spr3pt:"), Child, c_spr3pt = TextObject, StringFrame, End,
  181.                     Child, Label2("spr4pt:"), Child, c_spr4pt = TextObject, StringFrame, End,
  182.                     Child, Label2("spr5pt:"), Child, c_spr5pt = TextObject, StringFrame, End,
  183.                     Child, Label2("spr6pt:"), Child, c_spr6pt = TextObject, StringFrame, End,
  184.                     Child, Label2("spr7pt:"), Child, c_spr7pt = TextObject, StringFrame, End,
  185.                     Child, Label2("spr8pt:"), Child, c_spr8pt = TextObject, StringFrame, End,
  186.                     End,
  187.                 Child, HGroup, GroupFrameT("Audio"), MUIA_Group_Columns, 2,
  188.                     Child, Label2("aud0lc:"), Child, c_aud0lc = StringHex8,
  189.                     Child, Label2("aud0len:"), Child, c_aud0len = StringHex4,
  190.                     Child, Label2("aud0per:"), Child, c_aud0per = StringHex4,
  191.                     Child, Label2("aud0vol:"), Child, c_aud0vol = StringHex4,
  192.                     Child, Label2("aud0dat:"), Child, c_aud0dat = StringHex4,
  193.                     Child, Label2("aud1lc:"), Child, c_aud1lc = StringHex8,
  194.                     Child, Label2("aud1len:"), Child, c_aud1len = StringHex4,
  195.                     Child, Label2("aud1per:"), Child, c_aud1per = StringHex4,
  196.                     Child, Label2("aud1vol:"), Child, c_aud1vol = StringHex4,
  197.                     Child, Label2("aud1dat:"), Child, c_aud1dat = StringHex4,
  198.                     Child, Label2("aud2lc:"), Child, c_aud2lc = StringHex8,
  199.                     Child, Label2("aud2len:"), Child, c_aud2len = StringHex4,
  200.                     Child, Label2("aud2per:"), Child, c_aud2per = StringHex4,
  201.                     Child, Label2("aud2vol:"), Child, c_aud2vol = StringHex4,
  202.                     Child, Label2("aud2dat:"), Child, c_aud2dat = StringHex4,
  203.                     Child, Label2("aud3lc:"), Child, c_aud3lc = StringHex8,
  204.                     Child, Label2("aud3len:"), Child, c_aud3len = StringHex4,
  205.                     Child, Label2("aud3per:"), Child, c_aud3per = StringHex4,
  206.                     Child, Label2("aud3vol:"), Child, c_aud3vol = StringHex4,
  207.                     Child, Label2("aud3dat:"), Child, c_aud3dat = StringHex4,
  208.                     End,
  209.                 End,
  210.                 Child, HGroup, GroupFrameT("ECS/AGA"), MUIA_Group_Columns, 2,
  211.                     Child, Label2("lisaid:"), Child, c_lisaid = TextObject, StringFrame, End,
  212.                     Child, Label2("htotal:"), Child, c_htotal = TextObject, StringFrame, End,
  213.                     Child, Label2("hsstop:"), Child, c_hsstop = TextObject, StringFrame, End,
  214.                     Child, Label2("hbstrt:"), Child, c_hbstrt = TextObject, StringFrame, End,
  215.                     Child, Label2("hbstop:"), Child, c_hbstop = TextObject, StringFrame, End,
  216.                     Child, Label2("vtotal:"), Child, c_vtotal = TextObject, StringFrame, End,
  217.                     Child, Label2("vsstop:"), Child, c_vsstop = TextObject, StringFrame, End,
  218.                     Child, Label2("vbstrt:"), Child, c_vbstrt = TextObject, StringFrame, End,
  219.                     Child, Label2("vbstop:"), Child, c_vbstop = TextObject, StringFrame, End,
  220.                     Child, Label2("sprhstrt:"), Child, c_sprhstrt = TextObject, StringFrame, End,
  221.                     Child, Label2("sprhstop:"), Child, c_sprhstop = TextObject, StringFrame, End,
  222.                     Child, Label2("bplhstrt:"), Child, c_bplhstrt = TextObject, StringFrame, End,
  223.                     Child, Label2("bplhstop:"), Child, c_bplhstop = TextObject, StringFrame, End,
  224.                     Child, Label2("hhpos:"), Child, c_hhpos = TextObject, StringFrame, End,
  225.                     Child, Label2("beamcon0:"), Child, c_beamcon0 = TextObject, StringFrame, End,
  226.                     Child, Label2("hsstrt:"), Child, c_hsstrt = TextObject, StringFrame, End,
  227.                     Child, Label2("vsstrt:"), Child, c_vsstrt = TextObject, StringFrame, End,
  228.                     Child, Label2("hcenter:"), Child, c_hcenter = TextObject, StringFrame, End,
  229.                     Child, Label2("diwhigh:"), Child, c_diwhigh = TextObject, StringFrame, End,
  230.                     Child, Label2("bplhmod:"), Child, c_bplhmod = TextObject, StringFrame, End,
  231.                     Child, Label2("sprhpt:"), Child, c_sprhpt = TextObject, StringFrame, End,
  232.                     Child, Label2("bplhpt:"), Child, c_bplhpt = TextObject, StringFrame, End,
  233.                     Child, Label2("fmode:"), Child, c_fmode = TextObject, StringFrame, End,
  234.                     End,
  235.                 End,
  236.             End;
  237.         if (win_cust) {
  238.             DoMethod(app,OM_ADDMEMBER,win_cust);
  239.             sethex8t(c_vhpos,*((ULONG*)&(custom->wdcu_regs[2])));
  240.             sethex4t(c_joy0dat,custom->wdcu_regs[5]);
  241.             sethex4t(c_joy1dat,custom->wdcu_regs[6]);
  242.             sethex4t(c_clxdat,custom->wdcu_regs[7]);
  243.             sethex4(c_adkcon,custom->wdcu_regs[8]);
  244.             sethex4t(c_pot0dat,custom->wdcu_regs[0x012/2]);
  245.             sethex4t(c_pot1dat,custom->wdcu_regs[0x014/2]);
  246.             sethex4(c_potgo,custom->wdcu_regs[0x016/2]);
  247.             sethex4(c_serdat,custom->wdcu_regs[0x018/2]);
  248.             sethex4(c_dskbyt,custom->wdcu_regs[0x01a/2]);
  249.             if (custom->wdcu_flags[0x022].modi) sethex8(c_dskpt,*((ULONG*)&(custom->wdcu_regs[0x020/2])));
  250.             if (custom->wdcu_flags[0x024].modi) sethex4(c_dsklen,custom->wdcu_regs[0x024/2]);
  251.             if (custom->wdcu_flags[0x02e].modi) sethex4(c_copcon,custom->wdcu_regs[0x02e/2]);
  252.             if (custom->wdcu_flags[0x030].modi) sethex4(c_serdat,custom->wdcu_regs[0x030/2]);
  253.             if (custom->wdcu_flags[0x032].modi) sethex4(c_serper,custom->wdcu_regs[0x032/2]);
  254.             if (custom->wdcu_flags[0x036].modi) sethex4(c_joytest,custom->wdcu_regs[0x036/2]);
  255.             if (custom->wdcu_flags[0x040].modi) sethex4(c_bltcon0,custom->wdcu_regs[0x040/2]);
  256.             if (custom->wdcu_flags[0x042].modi) sethex4(c_bltcon1,custom->wdcu_regs[0x042/2]);
  257.             if (custom->wdcu_flags[0x044].modi) sethex4(c_bltafwm,custom->wdcu_regs[0x044/2]);
  258.             if (custom->wdcu_flags[0x046].modi) sethex4(c_bltalwm,custom->wdcu_regs[0x046/2]);
  259.             if (custom->wdcu_flags[0x048].modi) sethex8(c_bltcpt,*((ULONG*)&(custom->wdcu_regs[0x048/2])));
  260.             if (custom->wdcu_flags[0x04c].modi) sethex8(c_bltbpt,*((ULONG*)&(custom->wdcu_regs[0x04c/2])));
  261.             if (custom->wdcu_flags[0x050].modi) sethex8(c_bltapt,*((ULONG*)&(custom->wdcu_regs[0x050/2])));
  262.             if (custom->wdcu_flags[0x054].modi) sethex8(c_bltdpt,*((ULONG*)&(custom->wdcu_regs[0x054/2])));
  263.             if (custom->wdcu_flags[0x058].modi) sethex4t(c_bltsize,custom->wdcu_regs[0x058/2]);
  264.             if (custom->wdcu_flags[0x05c].modi) sethex4(c_bltsizv,custom->wdcu_regs[0x05c/2]);
  265.             if (custom->wdcu_flags[0x05e].modi) sethex4t(c_bltsizh,custom->wdcu_regs[0x05e/2]);
  266.             if (custom->wdcu_flags[0x060].modi) sethex4(c_bltcmod,custom->wdcu_regs[0x060/2]);
  267.             if (custom->wdcu_flags[0x062].modi) sethex4(c_bltbmod,custom->wdcu_regs[0x062/2]);
  268.             if (custom->wdcu_flags[0x064].modi) sethex4(c_bltamod,custom->wdcu_regs[0x064/2]);
  269.             if (custom->wdcu_flags[0x066].modi) sethex4(c_bltdmod,custom->wdcu_regs[0x066/2]);
  270.             if (custom->wdcu_flags[0x070].modi) sethex4(c_bltcdat,custom->wdcu_regs[0x070/2]);
  271.             if (custom->wdcu_flags[0x072].modi) sethex4(c_bltbdat,custom->wdcu_regs[0x072/2]);
  272.             if (custom->wdcu_flags[0x074].modi) sethex4(c_bltadat,custom->wdcu_regs[0x074/2]);
  273.             sethex4t(c_lisaid,custom->wdcu_regs[0x07c/2]);
  274.             if (custom->wdcu_flags[0x07e].modi) sethex4(c_dsksync,custom->wdcu_regs[0x07e/2]);
  275.             if (custom->wdcu_flags[0x082].modi) sethex8(c_cop1lc,*((ULONG*)&(custom->wdcu_regs[0x080/2])));
  276.             if (custom->wdcu_flags[0x086].modi) sethex8(c_cop2lc,*((ULONG*)&(custom->wdcu_regs[0x084/2])));
  277.             if (custom->wdcu_flags[0x088].modi) sethex4t(c_copjmp1,custom->wdcu_regs[0x088/2]);
  278.             if (custom->wdcu_flags[0x08a].modi) sethex4t(c_copjmp2,custom->wdcu_regs[0x08a/2]);
  279.             if (custom->wdcu_flags[0x08e].modi) sethex4(c_diwstrt,custom->wdcu_regs[0x08e/2]);
  280.             if (custom->wdcu_flags[0x090].modi) sethex4(c_diwstop,custom->wdcu_regs[0x090/2]);
  281.             if (custom->wdcu_flags[0x092].modi) sethex4(c_ddfstrt,custom->wdcu_regs[0x092/2]);
  282.             if (custom->wdcu_flags[0x094].modi) sethex4(c_ddfstop,custom->wdcu_regs[0x094/2]);
  283.             if (custom->wdcu_flags[0x098].modi) sethex4(c_clxcon,custom->wdcu_regs[0x098/2]);
  284.             if (custom->wdcu_flags[0x0a2].modi) sethex8(c_aud0lc,*((ULONG*)&(custom->wdcu_regs[0x0a0/2])));
  285.             if (custom->wdcu_flags[0x0a4].modi) sethex4(c_aud0len,custom->wdcu_regs[0x0a4/2]);
  286.             if (custom->wdcu_flags[0x0a6].modi) sethex4(c_aud0per,custom->wdcu_regs[0x0a6/2]);
  287.             if (custom->wdcu_flags[0x0a8].modi) sethex4(c_aud0vol,custom->wdcu_regs[0x0a8/2]);
  288.             if (custom->wdcu_flags[0x0aa].modi) sethex4(c_aud0dat,custom->wdcu_regs[0x0aa/2]);
  289.             if (custom->wdcu_flags[0x0b2].modi) sethex8(c_aud1lc,*((ULONG*)&(custom->wdcu_regs[0x0b0/2])));
  290.             if (custom->wdcu_flags[0x0b4].modi) sethex4(c_aud1len,custom->wdcu_regs[0x0b4/2]);
  291.             if (custom->wdcu_flags[0x0b6].modi) sethex4(c_aud1per,custom->wdcu_regs[0x0b6/2]);
  292.             if (custom->wdcu_flags[0x0b8].modi) sethex4(c_aud1vol,custom->wdcu_regs[0x0b8/2]);
  293.             if (custom->wdcu_flags[0x0ba].modi) sethex4(c_aud1dat,custom->wdcu_regs[0x0ba/2]);
  294.             if (custom->wdcu_flags[0x0c2].modi) sethex8(c_aud2lc,*((ULONG*)&(custom->wdcu_regs[0x0c0/2])));
  295.             if (custom->wdcu_flags[0x0c4].modi) sethex4(c_aud2len,custom->wdcu_regs[0x0c4/2]);
  296.             if (custom->wdcu_flags[0x0c6].modi) sethex4(c_aud2per,custom->wdcu_regs[0x0c6/2]);
  297.             if (custom->wdcu_flags[0x0c8].modi) sethex4(c_aud2vol,custom->wdcu_regs[0x0c8/2]);
  298.             if (custom->wdcu_flags[0x0ca].modi) sethex4(c_aud2dat,custom->wdcu_regs[0x0ca/2]);
  299.             if (custom->wdcu_flags[0x0d2].modi) sethex8(c_aud3lc,*((ULONG*)&(custom->wdcu_regs[0x0d0/2])));
  300.             if (custom->wdcu_flags[0x0d4].modi) sethex4(c_aud3len,custom->wdcu_regs[0x0d4/2]);
  301.             if (custom->wdcu_flags[0x0d6].modi) sethex4(c_aud3per,custom->wdcu_regs[0x0d6/2]);
  302.             if (custom->wdcu_flags[0x0d8].modi) sethex4(c_aud3vol,custom->wdcu_regs[0x0d8/2]);
  303.             if (custom->wdcu_flags[0x0da].modi) sethex4(c_aud3dat,custom->wdcu_regs[0x0da/2]);
  304. #define set4(a,b) if (custom->wdcu_flags[a].modi) sethex4(b,custom->wdcu_regs[a/2]);
  305. #define set4t(a,b) if (custom->wdcu_flags[a].modi) sethex4t(b,custom->wdcu_regs[a/2]);
  306. #define set8(a,b) if (custom->wdcu_flags[a+2].modi) sethex8(b,*((ULONG*)&(custom->wdcu_regs[a/2])));
  307. #define set8t(a,b) if (custom->wdcu_flags[a+2].modi) sethex8t(b,*((ULONG*)&(custom->wdcu_regs[a/2])));
  308.             set8t(0x0e0,c_bpl1pt)
  309.             set8t(0x0e4,c_bpl2pt)
  310.             set8t(0x0e8,c_bpl3pt)
  311.             set8t(0x0ec,c_bpl4pt)
  312.             set8t(0x0f0,c_bpl5pt)
  313.             set8t(0x0f4,c_bpl6pt)
  314.             set8t(0x0f8,c_bpl7pt)
  315.             set8t(0x0fc,c_bpl8pt)
  316.             set4(0x0100,c_bplcon0)
  317.             set4(0x0102,c_bplcon1)
  318.             set4(0x0104,c_bplcon2)
  319.             set4(0x0106,c_bplcon3)
  320.             set4(0x0108,c_bpl1mod)
  321.             set4(0x010a,c_bpl2mod)
  322.             set4(0x010c,c_bplcon4)
  323.             set4(0x010e,c_clxcon2)
  324.             set8t(0x0120,c_spr1pt)
  325.             set8t(0x0124,c_spr2pt)
  326.             set8t(0x0128,c_spr3pt)
  327.             set8t(0x012c,c_spr4pt)
  328.             set8t(0x0130,c_spr5pt)
  329.             set8t(0x0134,c_spr6pt)
  330.             set8t(0x0138,c_spr7pt)
  331.             set8t(0x013c,c_spr8pt)
  332.             set4(0x0180,c_color00)
  333.             set4(0x0182,c_color01)
  334.             set4(0x0184,c_color02)
  335.             set4(0x0186,c_color03)
  336.             set4(0x0188,c_color04)
  337.             set4(0x018a,c_color05)
  338.             set4(0x018c,c_color06)
  339.             set4(0x018e,c_color07)
  340.             set4(0x0190,c_color08)
  341.             set4(0x0192,c_color09)
  342.             set4(0x0194,c_color10)
  343.             set4(0x0196,c_color11)
  344.             set4(0x0198,c_color12)
  345.             set4(0x019a,c_color13)
  346.             set4(0x019c,c_color14)
  347.             set4(0x019e,c_color15)
  348.             set4(0x01a0,c_color16)
  349.             set4(0x01a2,c_color17)
  350.             set4(0x01a4,c_color18)
  351.             set4(0x01a6,c_color19)
  352.             set4(0x01a8,c_color20)
  353.             set4(0x01aa,c_color21)
  354.             set4(0x01ac,c_color22)
  355.             set4(0x01ae,c_color23)
  356.             set4(0x01b0,c_color24)
  357.             set4(0x01b2,c_color25)
  358.             set4(0x01b4,c_color26)
  359.             set4(0x01b6,c_color27)
  360.             set4(0x01b8,c_color28)
  361.             set4(0x01ba,c_color29)
  362.             set4(0x01bc,c_color30)
  363.             set4(0x01be,c_color31)
  364.             set4t(0x01c0,c_htotal)
  365.             set4t(0x01c2,c_hsstop)
  366.             set4t(0x01c4,c_hbstrt)
  367.             set4t(0x01c6,c_hbstop)
  368.             set4t(0x01c8,c_vtotal)
  369.             set4t(0x01ca,c_vsstop)
  370.             set4t(0x01cc,c_vbstrt)
  371.             set4t(0x01ce,c_vbstop)
  372.             set4t(0x01d0,c_sprhstrt)
  373.             set4t(0x01d2,c_sprhstop)
  374.             set4t(0x01d4,c_bplhstrt)
  375.             set4t(0x01d6,c_bplhstop)
  376.             sethex4t(c_hhpos,custom->wdcu_regs[0x01da/2]);
  377.             set4t(0x01dc,c_beamcon0)
  378.             set4t(0x01de,c_hsstrt)
  379.             set4t(0x01e0,c_vsstrt)
  380.             set4t(0x01e2,c_hcenter)
  381.             set4t(0x01e4,c_diwhigh)
  382.             set4t(0x01e6,c_bplhmod)
  383.             set8t(0x01e8,c_sprhpt)
  384.             set8t(0x01ec,c_bplhpt)
  385.             set4t(0x01fc,c_fmode)
  386.             DoMethod(win_cust,MUIM_Notify,MUIA_Window_CloseRequest,TRUE,app,2,MUIM_Application_ReturnID,MAIN_MORECUST);
  387.             set(win_cust,MUIA_Window_Open,TRUE);
  388.         } else {
  389.             MUI_Request(app,win,0,NULL,"Ok","Couldn't open Custom window.");
  390.         }
  391.     }
  392. }
  393.  
  394. /****************************************************************************/
  395.  
  396.